<? include_once("config.php")?>
<!doctype html>
<html lang="zh-CN">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
	    <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no,width=device-width,height=device-height">
        <? require_once('title.php');?>
        <link href="favicon.ico" rel="shortcut icon">
        <link rel="stylesheet" href="css/common/swiper.css">
        <link rel="stylesheet" href="css/common/base.css">
        <link rel="stylesheet" href="css/common/media.css">
        <link rel="stylesheet" href="css/common/animation.css">
        <link rel="stylesheet" href="css/news/style.css">
    </head>
    <body>
        <div class="beginning left flex flex-align-items">
                <i class="line top"></i>
                <i class="line bottom"></i>
                <img src="img/common/beginningLogo.png" alt="入场logo图">
        </div>
        <div class="beginning right flex flex-align-items">
                <i class="line top"></i>
                <i class="line bottom"></i>
                <img src="img/common/beginningLogoTxt.png" alt="入场logo文字">
        </div>
        <div class="cutLetter flex flex-align-items flex-justify-content">
            <p>创意</p>
            <p class="mid">规范</p>
            <p>智能</p>
        </div>
        <div class="container">
            <? require_once('header.php');?>
			<?
			 $typeID=$_REQUEST['gid']?$_REQUEST['gid']:0;
			 $linkurl =  $_SERVER["PHP_SELF"]."";
			 
			switch($typeID){
			 case 0:
				  $title="公司新闻";
				  break;
			 case 1:
				  $title="访谈讲座";
			  break;
			 case 2:
				  $title="文娱活动";
				   break;
			
			}
			 ?> 
            <main>
                 <div class="news ready fluid">
                    <div class="title">
                        <p class="chn"><span>公司新闻</span></p>
                        <p class="eng"><span>NEWS</span></p>
                        <i class="tp horizontal"></i>
                        <i class="lft vertical"></i>
                        <i class="btm horizontal"></i>
                        <i class="rht vertical"></i>
                        <div class="newsNav flex">
                            <a href="news.php?gid=0" class="<? if($typeID==0){?> current <? }?> flex flex-align-items">
                                <span class="line"></span>公司新闻
                            </a>
                            <a href="news.php?gid=1" class="<? if($typeID==1){?> current <? }?> flex flex-align-items">
                                <span class="line"></span>访谈讲座
                            </a>
                            <a href="news.php?gid=2" class="<? if($typeID==2){?> current <? }?> flex flex-align-items">
                                <span class="line"></span>文娱活动
                            </a>
                        </div>
                    </div>
                    
                    <div class="contn">
                        <div class="box current grid">
                                    <div class="grid-sizer"></div>
									
							
							<? 
								$newsObj=newslist("$title","cn","0","9");
								$newsArr=$newsObj['newsArr'];
								foreach($newsArr as $newsList){
							?>
							
								<div class="grid-item">
											<a href="newsd.php?nid=<?=$newsList->ID?>&&gid=<?=$typeID?>">
												<p class="pic">
													<img src="upload/<?=$newsList->SMALLPIC?>" alt="">
												</p>
												<div class="content">
													<p class="newsTitle"><?=$newsList->TITLE?></p>    
													<p class="details">查看更多</p>
												</div>
											</a>
									</div>
			
							<? }?>

						
                                
                            
                        </div>
                        
                        <div class="choosePage flex flex-align-items flex-justify-content">
                           <?
							$newsPagerShow=$newsObj['pagerShow'];
							$newsPagerShow->setFirstText('First');
							$newsPagerShow->setPrevText('Previous');
							$newsPagerShow->setNextText('Next');
							$newsPagerShow->setLastText('Last');
							$newsPagerShow->setStyle('2');
							$newsPagerShow->lanAll = "Total:"; 
							$newsPagerShow->lanItems = "";
							echo $newsPagerShow->render(); 
							?>
                        </div>
                    </div>
                </div>
            </main>
            <? require_once('footer.php');?>
        </div>
        
        <script src="js/common/swiper.js"></script>
        <script src="js/common/jquery.js"></script>
        <script src="js/common/common.js"></script>
        <script src="https://unpkg.com/masonry-layout@4/dist/masonry.pkgd.min.js"></script>
        <script src="js/news/index.js"></script>
        <script src="js/common/choosePage.js"></script>
        <script src="js/common/animation.js"></script>
    </body>
</html>